
class WechatStore {
    /**
     * 当前实例
     */
    static instance

    /**
     * 构造函数
     */
    constructor() {
        // do nothing
    }

    /**
     * 获取单例
     */
    static getInstance() {
        if (false === this.instance instanceof this) {
            if (!window.localStorage) {
                console.log('浏览器不支持localStorage')
                return
            }
            this.instance = new WechatStore()
        }
        return this.instance
    }
}